package com.ydgk.jishuzhan.dao;

import com.ydgk.jishuzhan.beans.Comment;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CommentMapper {

    @Select("select * from comment_blog where forwardId=#{id}")
    List<Comment> findCommentsByBId(Integer id);

    void insert(Comment comment);

    void insert2(Comment comment);

    @Select("select * from comment_question where forwardId = #{id}")
    List<Comment> findCommentsByQId(Integer id);

    @Select("SELECT * FROM comment_blog ORDER BY id desc LIMIT 1;")
    Comment findLast();
}
